<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>单笔转账</title>
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="keywords" content="小镖人、社区、网络货运">
    <meta name="description" content="小镖人、社区、网络货运">
    <link rel="stylesheet" href="../../../../xbr_layui_extend/layui-v2.6.8/css/layui.css">
    <style>
        .layui-layout-admin {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 50px;
        }

        .layui-layout-admin .layui-footer {
            padding: 10px 0;
            text-align: center;
            left: 0
        }

        .layui-form-label {
            width: 120px;
        }

        .tooltip {
            position: relative;
            display: inline-block;
            cursor: pointer;
        }

        input {
            max-width: 300px;
        }

        .layui-icon {
            font-size: 27px;
        }

    </style>
</head>
<body>
<div class="layui-fluid" style="padding: 15px;">
    <form class="layui-form" action="" lay-filter="form-initPlat" id="userForm" method="post"
          style="margin-bottom: 80px">
        <div class="layui-form-item">
            <p>提示：民声银行批量转账</p>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">付款账户</label>
            <div class="layui-input-block">
                <input type="number" id="payerAcct" name="payerAcct" lay-verify="required" placeholder="请输入付款账户"
                       class="layui-input"/>
            </div>
        </div>
        <div class="layui-card">
            <div class="layui-card-header">收款人1</div>
            <div id="demo" class="layui-card-body">
                <div class="layui-form-item">
                    <label class="layui-form-label">付款账户1</label>
                    <div class="layui-input-block">
                        <input type="number" id="payerAcct1" name="payerAcct1" lay-verify="required" placeholder="请输入付款账户"
                               class="layui-input"/>
                    </div>
                </div>
                <div id="extraFormItems"></div> <!-- 新添加的表单项容器 -->
            </div>
        </div>
        <button class="layui-btn layui-btn-primary" id="adds">添加</button> <!-- 添加按钮 -->

        <!--提交按钮-->
        <div class="layui-form-item layui-layout-admin">
            <div class="layui-input-block">
                <div class="layui-footer">
                    <button id="text9" class="layui-btn" lay-submit="" lay-filter="post-initPlat"><i class="layui-icon">&#xe605;</i>立即提交
                    </button>
                </div>
            </div>
        </div>
    </form>
</div>


<script src="../../../../xbr_layui_extend/layui-v2.6.8/layui.js"></script>
<script>
    layui.extend({
        admin: '/platform/xbr_layui_extend/admin' //集成路径
    }).use(["admin", 'form'], function () {
        const $ = layui.$, form = layui.form, admin = layui.admin, element = layui.element;
        element.render('icon');
        $("#adds").click(function() {
            $('#extraFormItems').append('<div class="layui-form-item"><label class="layui-form-label">付款账户1</label> <div class="layui-input-block"> <input type="number" id="payerAcct1" name="payerAcct1" lay-verify="required" placeholder="请输入付款账户"class="layui-input"/> </div> </div>')
        })

        //上传完毕 提交表单
        // // form.render(null, 'form-initPlat');
        // form.on('submit(post-initPlat)', function (data) {
        //     console.log((data.field))
        //     admin.req({
        //         url: "http://192.168.0.179:10002/capital/trade/getTradeRecordPage",
        //         data: data.field,
        //         type: 'post',
        //         done: function (res) {
        //             //保存成功
        //             layer.msg(res.data == null ? '保存成功！' : '修改成功！', {
        //                 icon: 1, time: 1000
        //             }, function () {
        //                 const index = parent.layer.getFrameIndex(window.name); //获取窗口索引
        //                 parent.location.reload();
        //                 parent.layer.close(index);
        //             });
        //         }
        //     });
        //     return false;
        // });

    });
</script>
</body>
</html>
